package cn.sise.edu.crm.mapper;

import cn.sise.edu.crm.domain.Employee;
import cn.sise.edu.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    List<Employee> selectForList(QueryObject qo);

    void insertRelation(@Param("empId")Long empId, @Param("roleId")Long roleId);

    void deleteByEmployeeId(Long id);

    Employee selectNameAndPassword(@Param("name") String name, @Param("password") String password);

    void deleteByEmployeeIdS(@Param("ids") Long[] ids);

    Employee selectByUsename(String username);

    List<Employee> selectByRoleSn(@Param("roles") String[] strings);
}